<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.13"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>General SQL Parser C/C++ Version: Architecture of General SQL Parser</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectlogo"><img alt="Logo" src="gudusoftware_190_120.png"/></td>
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">General SQL Parser C/C++ Version
   </div>
   <div id="projectbrief">It&#39;s a library provides an in-depth and detailed analysis of SQL scripts for various databases</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.13 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
$(function() {
  initMenu('',true,false,'search.php','Search');
  $(document).ready(function() { init_search(); });
});
</script>
<div id="main-nav"></div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div id="nav-path" class="navpath">
  <ul>
<li class="navelem"><a class="el" href="index.html">index</a></li>  </ul>
</div>
</div><!-- top -->
<div class="header">
  <div class="headertitle">
<div class="title">Architecture of General SQL Parser </div>  </div>
</div><!--header-->
<div class="contents">
<div class="textblock"><div class="image">
<img src="architecture_of_gsp.png" alt="architecture_of_gsp.png"/>
<div class="caption">
Architecture of General SQL Parser</div></div>
<h4>MAIN CONCEPTS IN GENERAL SQL PARSER</h4>
<ul>
<li>
Lexer, separating a stream of input sql query characters into different tokens.  </li>
<li>
Parser, analysing a stream of tokens generated by lexer, conforming to the formal grammar rules of SQL of a specific database vendor. and generate parse tree nodes.  </li>
<li>
Token: after reading input SQL script, General SQL parser breaks a stream of text into tokens, usually by looking for whitespace (tabs, spaces, new lines), then attaches extra context such as position to the tokens. Token usually stands for the basic elements of SQL, such as literals, comments, operators and so on  </li>
<li>
Parse tree nodes: General SQL Parser then takes the stream of tokens from the lexer and turns it into an abstract syntax tree representing the SQL query represented by the original text. Typical parse tree nodes including select list, from clause, join condition, datatypes and so on.  </li>
<li>
Statements: It is the top level parse tree node, it is the first type of parse tree node you get after successfully parsing a SQL script.  </li>
</ul>
</div></div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated on Tue Jun 13 2017 11:49:37 for General SQL Parser C/C++ Version by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.13
</small></address>
</body>
</html>
